package fr.charlott.batch.writer;

import java.util.List;

import org.springframework.batch.item.ItemWriter;
import org.springframework.beans.factory.annotation.Autowired;

import fr.charlott.core.repository.model.Reunion;
import fr.charlott.core.service.ReunionService;

public class ReunionWriter implements ItemWriter<Reunion>{

	@Autowired
	private ReunionService reunionService;
	

	@Override
	public void write(List<? extends Reunion> items) throws Exception {
		for (Reunion reunion : items) {
			reunionService.ajouterReunion(reunion);
		}
	}

	public void setReunionService(ReunionService reunionService) {
		this.reunionService = reunionService;
	}
}
